package com.eadaula05.arquivos;
import java.io.*;

import javax.swing.JOptionPane;

public class GravarArquivo1{
	public static void main (String[] args){
		try{
			File f = new File("dados.txt");
			BufferedWriter buff = new BufferedWriter(new FileWriter(f, true));
			
			String newLine = " ";
			newLine = JOptionPane.showInputDialog(null, "Nova linha");
			buff.write(System.getProperty("line.separator") + newLine);
			
			buff.flush();
			buff.close();
		} catch (IOException ex){
			System.out.println("File not found");
			ex.printStackTrace();
		}
	}
}
